package com.example.comprehension.fragment;

import com.example.comprehension.R;
import com.example.comprehension.R.layout;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

public class SeetingHelpFragment extends Fragment {
	private int drawableId = -1;

	public SeetingHelpFragment() {
	}

	public SeetingHelpFragment(int drawableId) {
		this.drawableId = drawableId;
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.fragment_setting_help, container,
				false);

		ImageView iv = (ImageView) view.findViewById(R.id.iv);
		if (drawableId != -1) {
			iv.setImageResource(drawableId);
		}

		if (drawableId != R.drawable.setting_service) {
			View rl = view.findViewById(R.id.rl);
			rl.setBackgroundResource(R.drawable.kefu_bg);
		}
		return view;
	}
}
